#pragma once

#include "Unit.h"

class Number
{
private:
	Unit _unit;

	uchar* _data;
	long _id;
	//refcount?
	uint _memLength;
	uint _dataLength;
	int _exponent;
	short _sign;

	int _minPrecision;
	int _delta;

public:
	Number(void);
	~Number(void);
	
	Number(long i);
	Number(char* numStr);

	void Init();
	void CopyFrom(const Number& n2);
	void CopyFrom(const Number* n2);

	void Scale(int count);
	void Normalize();
	void Pad(uint count);

	Number Add(Number n2);


	void Set(char* numStr);
	void Set(long i);

	void ToString(int decimalPlaces, char* result);
};

